import 'package:json_annotation/json_annotation.dart';
part 'yll_response_bean.g.dart';

@JsonSerializable()
class YllResponseBean {
  dynamic body;
  YllResponseHead head;
  String sign;

  YllResponseBean(this.body, this.head, this.sign);

  //不同的类使用不同的mixin即可
  factory YllResponseBean.fromJson(Map<String, dynamic> json) =>
      _$YllResponseBeanFromJson(json);
  Map<String, dynamic> toJson() => _$YllResponseBeanToJson(this);
}

@JsonSerializable()
class YllResponseHead {
  String errorMessage;
  String responseTime;
  String sequenceCode;
  String status;

  YllResponseHead(
      this.errorMessage, this.responseTime, this.sequenceCode, this.status);

  //不同的类使用不同的mixin即可
  factory YllResponseHead.fromJson(Map<String, dynamic> json) =>
      _$YllResponseHeadFromJson(json);
  Map<String, dynamic> toJson() => _$YllResponseHeadToJson(this);
}
